package com.henu.engineer.dao.mapper.student

import com.henu.engineer.dao.entity.student.StudentCourseMethod
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Repository

/**
 * 学生的各课程各考核方式成绩表
 *
 * @author noexcept
 * @date 2021/7/27 22:02
 */
@Mapper
@Repository
interface StudentCourseMethodXmlMapper {
    fun insertSingle(studentCourseMethod: StudentCourseMethod): Boolean
    fun insertList(list: List<StudentCourseMethod>): Int
    fun deleteSingle(studentId: String, courseId: String, method: String): Boolean
    fun updateSingle(studentId: String, courseId: String, method: String, score: Double): Boolean

    /**
     * 查询有关某个学生的所有课程的所有考核方式成绩
     */
    fun selectAllRecordsByStudentId(studentId: String): List<StudentCourseMethod>

    /**
     * 某课程所有学生的各考核方式成绩
     */
    fun selectCourseMethodScoreOfAllStudent(courseId: String): List<StudentCourseMethod>
}